package com.mall.client.server.controller;

import com.mall.client.server.domain.Source;
import com.mall.client.server.service.SourceService;
import com.mall.common.core.domain.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @ClassName SourceController
 * @Description 描述
 * @Author Qiu Feng
 * @Date 2025/2/17 11:13
 */
@RestController
@RequestMapping("/source")
@CrossOrigin
public class SourceController {
    @Autowired
    private SourceService sourceService;

    /**
     * 查询来源渠道
     */
    @GetMapping("/list")
    public Result list() {
        List<Source> listResult = sourceService.selectSourceList();
        Result<List<Source>> success = Result.success(listResult);
        return success;
    }
}
